package com.bysc.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.bysc.pojo.entity.Task;

import java.util.List;

@Mapper
public interface TasksMapper {

    /**
     * 动态查询任务列表
     * @return
     */
    List<Task> select();

    /**
     * 根据id删除任务
     * @param id
     */
    @Delete("delete from tasks where id = #{id}")
    void deleteById(Integer id);

    /**
     * 插入任务
     * @param task
     */
    void insert(Task task);
}
